// 如果由下一级路由，要将index.tsx -> _layout.tsx
// {props.children}表示路由出口
import { IRouteComponentProps, Redirect } from 'umi';

const Index = ({ children, location }: IRouteComponentProps) => {
  if (location.pathname === '/home') {
    return <Redirect to="/home/hot"></Redirect>;
  }
  return (
    <>
      <div>首页页面</div>
      {children}
    </>
  );
};

export default Index;
